package com.atguigu.guli.service.edu.service;

import com.atguigu.guli.service.base.dto.CourseDto;
import com.atguigu.guli.service.edu.entity.Course;
import com.atguigu.guli.service.edu.entity.form.CourseInfoForm;
import com.atguigu.guli.service.edu.entity.query.CourseSeacherTwo;
import com.atguigu.guli.service.edu.entity.query.CourseSearch;
import com.atguigu.guli.service.edu.entity.vo.CourseDetailsVo;
import com.atguigu.guli.service.edu.entity.vo.CoursePublishVo;
import com.atguigu.guli.service.edu.entity.vo.CourseVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author atguigu
 * @since 2021-07-26
 */
public interface CourseService extends IService<Course> {

    String saveCourseInfo(CourseInfoForm courseInfoForm);

    void updateCourseInfo(CourseInfoForm courseInfoForm, String courseId);

    Page<CourseVO> getListByCondition(Long pageNum, Long pageSize, CourseSearch courseSearch);

    CoursePublishVo getCoursePublishVoById(String id);

    boolean publishCourseById(String id);

    List<Course> listCourses(CourseSeacherTwo courseSeacher);

    CourseDetailsVo getCourseDetails(String id);

    List<Course> selectHotCourse();

    CourseDto getCourseDtoById(String courseId);

    void updateBuyCountById(String courseId);
}
